home *** CD-ROM | disk | FTP | other *** search
/ Dr. Windows 3 / dr win3.zip / dr win3 / WINWORDS / WINE02BX.ZIP / LISP / MODES / C-MODE.ELC < prev    next >
Text File  |  1993-03-28  |  14KB  |  141 lines

  1. ;;; compiled by @win386 on Sat Mar 13 14:30:32 1993
  2. ;;; from file c:/src/lucid-19.4/lisp/modes/c-mode.el
  3. ;;; emacs version 19.3 Lucid.
  4. ;;; bytecomp version 2.08; 27-aug-92.
  5. ;;; optimization is on.
  6. ;;; this file uses opcodes which do not exist in Emacs18.
  7.  
  8. (if (and (boundp 'emacs-version)
  9.      (or (and (boundp 'epoch::version) epoch::version)
  10.          (string-lessp emacs-version "19")))
  11.     (error "This file was compiled for Emacs19."))
  12.  
  13. (defvar c-mode-abbrev-table nil "\
  14. Abbrev table in use in C-mode buffers.")
  15. (define-abbrev-table 'c-mode-abbrev-table nil)
  16. (defvar c-mode-map nil "\
  17. Keymap used in C mode.")
  18. (byte-code "¼â┴ ┬├─#ê┬┼─#ê┬╞╟#ê┬╚╔#ê┬╩╦#ê┬╠═#ê┬╬╧#ê┬╨╤#ê┬╥╙#ê┬╘╒#ê┬╓╫#ç" [c-mode-map make-sparse-keymap define-key "{" electric-c-brace "}" ";" electric-c-semi "#" electric-c-sharp-sign ":" electric-c-terminator "{" c-insert-braces "" mark-c-function "" indent-c-exp "q" c-fill-paragraph "" backward-delete-char-untabify "    " c-indent-command] 4)
  19. (autoload 'c-macro-expand "cmacexp" "\
  20. Display the result of expanding all C macros occurring in the region.
  21. The expansion is entirely correct because it uses the C preprocessor." t)
  22. (defvar c-mode-syntax-table nil "\
  23. Syntax table in use in C-mode buffers.")
  24. (byte-code "¼╦┴ ┬├─#ê┬┼╞#ê┬╟╚#ê┬╔╩#ê┬╦╩#ê┬╠╩#ê┬═╩#ê┬╬╩#ê┬╧╩#ê┬╨╩#ê┬╤╩#ê┬╥╙#ê┴ç" [c-mode-syntax-table make-syntax-table modify-syntax-entry 92 "\\" 47 ". 14" 42 ". 23" 43 "." 45 61 37 60 62 38 124 39 "\""] 4)
  25. (defconst c-indent-level 2 "\
  26. *Indentation of C statements with respect to containing block.")
  27. (defconst c-brace-imaginary-offset 0 "\
  28. *Imagined indentation of a C open brace that actually follows a statement.")
  29. (defconst c-brace-offset 0 "\
  30. *Extra indentation for braces, compared with other text in same context.")
  31. (defconst c-argdecl-indent 5 "\
  32. *Indentation level of declarations of C function arguments.")
  33. (defconst c-label-offset -2 "\
  34. *Offset of C label lines and case statements relative to usual indentation.")
  35. (defconst c-continued-statement-offset 2 "\
  36. *Extra indent for lines not starting new statements.")
  37. (defconst c-continued-brace-offset 0 "\
  38. *Extra indent for substatements that start with open-braces.
  39. This is in addition to c-continued-statement-offset.")
  40. (defconst c-auto-newline nil "\
  41. *Non-nil means automatically newline before and after braces,
  42. and after colons and semicolons, inserted in C code.
  43. If you do not want a leading newline before braces then use:
  44.   (define-key c-mode-map \"{\" 'electric-c-semi)")
  45. (defconst c-tab-always-indent t "\
  46. *Non-nil means TAB in C mode should always reindent the current line,
  47. regardless of where in the line point is when the TAB command is used.")
  48. (fset 'c-mode #[nil "└ ê┴\n!ê├┼╔\n!ê╦╠!ê═P ╦╧!ê ╦╨!ê╤╦╥!ê╙╦╘!ê╒╦╓!ê╤╦╫!ê╪╦┘!ê┌╦█!ê▄╦▌!ê▐╦▀!êα╦ß!ê╤!Γπ!ç" [kill-all-local-variables use-local-map c-mode-map c-mode major-mode "C" mode-name c-mode-abbrev-table local-abbrev-table set-syntax-table c-mode-syntax-table make-local-variable paragraph-start "^$\\|" page-delimiter paragraph-separate paragraph-ignore-fill-prefix t indent-line-function c-indent-line indent-region-function c-indent-region require-final-newline comment-start "/* " comment-end " */" comment-column 32 comment-start-skip "/\\*+ *" comment-indent-hook c-comment-indent parse-sexp-ignore-comments run-hooks c-mode-hook] 2 "\
  49. Major mode for editing C code.
  50. Expression and list commands understand all C brackets.
  51. Tab indents for C code.
  52. Comments are delimited with /* ... */.
  53. Paragraphs are separated by blank lines only.
  54. Delete converts tabs to spaces as it moves back.
  55. \\{c-mode-map}
  56. Variables controlling indentation style:
  57.  c-tab-always-indent
  58.     Non-nil means TAB in C mode should always reindent the current line,
  59.     regardless of where in the line point is when the TAB command is used.
  60.  c-auto-newline
  61.     Non-nil means automatically newline before and after braces,
  62.     and after colons and semicolons, inserted in C code.
  63.  c-indent-level
  64.     Indentation of C statements within surrounding block.
  65.     The surrounding block's indentation is the indentation
  66.     of the line on which the open-brace appears.
  67.  c-continued-statement-offset
  68.     Extra indentation given to a substatement, such as the
  69.     then-clause of an if or body of a while.
  70.  c-continued-brace-offset
  71.     Extra indentation given to a brace that starts a substatement.
  72.     This is in addition to c-continued-statement-offset.
  73.  c-brace-offset
  74.     Extra indentation for line if it starts with an open brace.
  75.  c-brace-imaginary-offset
  76.     An open brace following other text is treated as if it were
  77.     this far to the right of the start of its line.
  78.  c-argdecl-indent
  79.     Indentation level of declarations of C function arguments.
  80.  c-label-offset
  81.     Extra indentation for line that is a label, or case or default.
  82.  
  83. Settings for K&R and BSD indentation styles are
  84.   c-indent-level                5    8
  85.   c-continued-statement-offset  5    8
  86.   c-brace-offset               -5   -8
  87.   c-argdecl-indent              0    8
  88.   c-label-offset               -5   -8
  89.  
  90. Turning on C mode calls the value of the variable c-mode-hook with no args,
  91. if that value is non-nil." nil])
  92. (fset 'c-comment-indent #[nil "└┴!½é┬ç`è┬yê└─!½ê┼╞!êiT¬Ñ└╟!¼à└╚!½â╔¬ÿ bê╩╦xê ┬U½ån½â┬¬àiT ]*ç" [looking-at "^/\\*" 0 opoint "[     ]*}[     ]*\\($\\|/\\*\\)" search-forward "}" "^#[     ]*endif[     ]*" "^#[     ]*else[     ]*" 7 "     " nil comment-column] 2])
  93. (fset 'c-fill-paragraph #[(&optional arg) "è└yê┴┬wê├ !)ë¼å╞ ╟=½┘è└yê├╚!½è╔ !ê╩i╦\"¬É½â╠yê`═╬╟!╟\"ê`{)╨P╨Pîeè╙╘┬╒#ê╠yê`)}ê╓!êè╙╘!ê└yê├╪!¡é┘ -¬ä╓!)ç" [0 "     " nil looking-at comment-start-skip first-line calculate-c-indent t "[     ]*/\\*.*\\*/" re-search-forward make-string 32 1 move-to-column calculate-c-indent-within-comment paragraph-start "\\|^[     ]*/\\*[     ]*$\\|^[     ]*\\*/[     ]*$\\|^[^     /*]" paragraph-separate fill-prefix search-forward "*/" move fill-paragraph arg "[     ]*\\*/" delete-indentation] 6 "\
  94. Like \\[fill-paragraph] but handle C comments.
  95. If point is inside a comment, the current paragraph of the comment
  96. is filled, preserving the comment indentation or line-starting decorations." "P"])
  97. (fset 'electric-c-brace #[(arg) "└\n¼╢l½│è├└xên)¼ë ½º┼ ê╞ êcê┼ ê ½è╞ ê`╚Z┼ êè    ½ä    Tbê╔╩!ê)    ½îè    bê╦╠\n!!)¬æ═V½å╬Z╦╠\n!!)ç" [nil insertpos arg "     " c-auto-newline c-indent-line newline last-command-char 2 delete-char -1 self-insert-command prefix-numeric-value 127 128] 3 "\
  98. Insert character and correct line's indentation." "P"])
  99. (byte-code "└┴Mê┬├Mç" [c-insert-brackets #[nil "└cêè┴c)ç" [91 93] 1 nil nil] c-insert-braces #[nil "└┴!ê┬ ê├ êè┬ ê─cê├ )ç" [electric-c-brace 1 newline c-indent-line 125] 2 nil nil]] 2)
  100. (fset 'electric-c-sharp-sign #[(arg) "è└┴xên)½ç┴├ !)ç┼╞ !!ç" ["     " nil c-auto-newline electric-c-terminator arg self-insert-command prefix-numeric-value] 3 "\
  101. Insert character and correct line's indentation." "P"])
  102. (fset 'electric-c-semi #[(arg) "½ä┴\n!ç├─\n!!ç" [c-auto-newline electric-c-terminator arg self-insert-command prefix-numeric-value] 3 "\
  103. Insert character and correct line's indentation." "P"])
  104. (fset 'electric-c-terminator #[(arg) "└` ¼φl½Ωè─yê┼└wêg╞U«┤╚=½ö╔╩!¼Åè╦└wê┼└wê`    W)«Ü╠ ê═`    \"╧8«è╨8«ä╤8))¼ªcê╥ ê½Ä╘ ¼è╒ ê`╓Z╥ êè\n½ä\nTbê╫╪!ê)\n½îè\nbê┘┌ !!)¬à┘┌ !!*ç" [nil end insertpos arg 0 "     " 35 last-command-char 58 looking-at "case[     '/(]" "a-zA-Z0-9_$" beginning-of-defun parse-partial-sexp pps 3 4 5 c-indent-line c-auto-newline c-inside-parens-p newline 2 delete-char -1 self-insert-command prefix-numeric-value] 3 "\
  105. Insert character and correct line's indentation." "P"])
  106. (fset 'c-inside-parens-p #[nil "└┴┬Åç" [nil (byte-code "èî`└ ê`}êdbê┴`┬├#«üef─U*ç" [beginning-of-defun scan-lists -1 1 40] 4) ((error))] 3])
  107. (fset 'c-indent-command #[(&optional whole-exp) "½╡┴ ┬ëè½â╟yêè╚yê`)` W½î╔╚!ê`╩┬wê¬o) V¡å╦ ╠$+ç¼îè═┬xên)¼â╬ ç┴ ç" [whole-exp c-indent-line nil end beg shift-amt c-tab-always-indent 0 1 forward-sexp "     \n" indent-code-rigidly "#" "     " insert-tab] 5 "\
  108. Indent current line as C code, or in some cases insert a tab character.
  109. If c-tab-always-indent is non-nil (the default), always indent current line.
  110. Otherwise, indent the current line only if point is at the left margin
  111. or in the lin